<template>
  <div>
    <div class="main-table">
      <el-tabs v-model="addNpcTask" @tab-click="handleClick">
        <el-tab-pane label="打样任务主信息" name="first">
          <npcTask></npcTask>
        </el-tab-pane>
        <el-tab-pane label="打样明细" name="second">
          <npcTaskItem></npcTaskItem>
        </el-tab-pane>
        <el-tab-pane label="供应商" name="thirdly">
          <npcTaskMapping></npcTaskMapping>
        </el-tab-pane>
      </el-tabs>   
    </div>
  </div>
</template>
<script>
  import NpcTask from './npcTask.vue'
  import NpcTaskItem from './npcTaskItem.vue'
  import NpcTaskMapping from './npcTaskMapping.vue'
  export default {
    components: {
      NpcTask,
      NpcTaskItem,
      NpcTaskMapping
    },    
    data() {
      return {
        addNpcTask: 'first'
      };
    },
    methods: {
      handleClick(tab, event) {
        console.log(tab, event);
      }
    }
  };
</script>